package com.transaction.domain;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 委托交易信息表
 *
 * @TableName sys_entrust
 */
@TableName(value = "sys_entrust")
@Data
public class SysEntrust implements Serializable {
    /**
     * 委托编号
     */
    @TableId(type = IdType.AUTO)
    private Long entrustId;

    /**
     * 委托机构id
     */
    private Long institutionId;

    /**
     * 股票编号
     */
    private Long stockId;

    /**
     * 委托价格
     */
    private BigDecimal money;

    /**
     * 委托数量
     */
    private Integer entrustNum;

    /**
     * 删除标识
     */
    @TableLogic
    private String delFlag;
    /**
     * 买卖标识
     */
    private String deal;

    /**
     * 委托时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date entrustTime;

    /**
     * 委托状态
     */
    private String status;
    /**
     * 委托机构对象
     */
    private SysInstitution institution;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
    //    暂时添加条件字段
    @TableField(exist = false)
    private long userId;


}